package com.song.service.Impl;

import com.song.dao.CategoryMapper;
import com.song.pojo.Category;
import com.song.service.CategoryService;
import com.song.vo.CategoryVo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 宋超
 * HP - the login name of the current user.
 * 2020/12/21 - the current system date.
 * 16:34 - the current system time.
 */
@Service
@Transactional
public class CategoryServiceImpl implements CategoryService {

    @Resource
    private CategoryMapper categoryMapper;

    //查询楼层列表
    public List<Category> findCategoryList(CategoryVo categoryVo) {
        return categoryMapper.findCategoryList(categoryVo);
    }

    //添加楼层
    public int addCategory(Category category) {
        return categoryMapper.addCategory(category);
    }


    //修改楼层
    public int updateCategory(Category category) {
        return categoryMapper.updateCategory(category);
    }

}
